package com.smart.five.ioc.dynamic.bean;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 测试类
 *
 * @author junrui.wang
 * @create 2018/6/14
 */
public class Test {
    public static void main(String[] args) {
        ApplicationContext ac = new ClassPathXmlApplicationContext("classpath*:com/smart/five/ioc/dynamic/bean/beans.xml");
        //UserService userService = (UserService) ac.getBean("userService");
        UserDao userDao = (UserDao) ac.getBean("userDao");
        UserService userService1 = (UserService) ac.getBean("userService1");
        UserService userService2 = (UserService) ac.getBean("userService2");
        System.out.println("end");

    }
}
